{include 'header.tpl'}
<ol class="breadcrumb">
    <li>用户列表</li>
</ol>
<form method="get" action="/admin/manager/default" class="form-inline">
    <table>
        <tr>
            <td>
                <label for="form-w" class="control-label">搜索关键字：</label>
                <input class="form-control" name="keyword" value="{$smarty.get.keyword}" placeholder="输入ID或名称进行查找"/>
            </td>
            <td>
                <label for="form-w" class="control-label">账号类型：</label>
                <select name="isadmin" class="form-control" title="账号类型">
                    <option value="">--请选择--</option>
                    {foreach from=$account_type item=item key=key}
                        <option value="{$key}" {if $smarty.get.isadmin eq $key}selected="selected"{/if}>{$item}</option>
                    {/foreach}
                </select>
            </td>
            <td>
                <label for="form-w" class="control-label">账号状态：</label>
                <select name="status" class="form-control" title="账号状态">
                    <option value="">--请选择--</option>
                    {foreach from=$status_type item=item key=key}
                        <option value="{$key}" {if $smarty.get.status eq $key}selected="selected"{/if}>{$item}</option>
                    {/foreach}
                </select>
            </td>
            <td>
                <label for="form-w" class="control-label">用户组：</label>
                <select name="gid" class="form-control" title="用户组">
                    <option value="">--请选择--</option>
                    {foreach from=$groupList item=item key=key}
                        <option value="{$key}" {if $smarty.get.gid eq $key}selected="selected"{/if}>{$item}</option>
                    {/foreach}
                </select>
            </td>
            <td><button type="submit" class="btn btn-primary">查找</button></td>
            {if $modify_user}
            <td>
                <form rel="ajax" method="post" action="#" class="form-horizontal" role="form">
                    <button type="button" class="btn" href="/admin/manager/modify" rel="ajax">添加账号</button>
                </form>
            </td>
            {/if}
        </tr>
    </table>
</form>
<div class="clearfix" style="height:30px;"></div>
<table class="table" style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
    <thead>
        <tr>
            <th width="30">UID</th>
            <th width="100" class="left">登录名</th>
            <th width="100" class="left">手机号码</th>
            <th width="100" class="left">用户姓名</th>
            <th class="left">所属组</th>
            <th width="60">类型</th>
            <th width="60">状态</th>
            {if $modify_user || $delete_user}<th width="100">操作</th>{/if}
        </tr>
    </thead>
    <tbody>
    {foreach from=$managerList item=item}
        <tr>
            <td>{$item.uid}</td>
            <td class="left">{$item.username}</td>
            <td class="left">{$item.mobile}</td>
            <td class="left">{$item.truename}</td>
            <td class="left">{$item.groupname}</td>
            <td>{$account_type[$item.isadmin]} </td>
            <td>{$status_type[$item.status]} </td>
            {if $modify_user || $delete_user}<td>
                {if $modify_user}<a href="/admin/manager/modify?id={$item.uid}" rel="ajax">编辑</a>&nbsp;&nbsp;{/if}
                {if $delete_user}<a href="javascript:void(0);" rel="confirm" data-href="/admin/manager/delete?id={$item.uid}" data-text="确定要删除这个用户吗？" class="btn-delete">删除</a>{/if}
            </td>{/if}
        </tr>
    {/foreach}
</table>
{include "pager.tpl"}
{include 'footer.tpl'}